package com.dsg.controller.apply;


import com.dsg.common.constants.MessageConstants;
import com.dsg.common.dto.AjaxResult;
import com.dsg.controller.base.BaseController;
import com.dsg.service.apply.IDsgApplyStatusService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 業務申請單状态 前端控制器
 * </p>
 *
 * @author system
 * @since 2020-08-07
 */
@RestController
@RequestMapping("/apply/dsgApplyStatus")
public class DsgApplyStatusController extends BaseController {

    @Autowired
    private IDsgApplyStatusService dsgApplyStatusService;

    /**
     * 批量更新Check車牌狀態
     *
     * @return
     */
    @PutMapping(value = "/updateDsgApplyStatus")
    @ApiOperation("批量更新Check車牌狀態")
    public AjaxResult updateDsgApplyStatus(@ApiParam(value = "id以，号分隔", name = "idList", required = true) @RequestParam String idList,
                                           @ApiParam(value = "Check车牌状态", name = "checkStatus", required = true) @RequestParam Integer checkStatus) {
        dsgApplyStatusService.updateDsgApplyStatus(idList, checkStatus);
        return result(MessageConstants.SSO_STATUS_SUCCESS);
    }
}
